package API.RegexAPI.Test;
import java.util.Scanner;

public class Email {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("Enter your email address: ");
        String email = sc.nextLine();
        if(email.matches("\\w+@[\\w&&[^_]]{2,6}(\\.[\\w&&[^_]]{2,6})+")){
            System.out.println("Your email address is valid");
        } else {
            System.out.println("Your email address is not valid");
        }
    }
}